package com.cddx.logistics.controller;

import com.cddx.logistics.domain.dto.AnnualLedgerQueryDTO;
import com.cddx.logistics.service.StockOperationService;
import com.cddx.logistics.util.model.R;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/annualledger")
public class AnnualLedgerController {
    @Resource
    private StockOperationService stockOperationService;

    @GetMapping("/queryPage")
    public R queryPage(AnnualLedgerQueryDTO queryDTO) {
        PageInfo<?> pageInfo = stockOperationService.queryAnnualLedger(queryDTO);
        return R.ok(pageInfo);
    }
}